﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace Readify.Management.Automation.GoGrid
{
    public class GoGridOption
    {
        internal static GoGridOption CreateFromXmlNode(XmlNode objectElementNode)
        {
            GoGridOption output = new GoGridOption();
            output.ID = GoGridHelper.GetAttributeElementValueFromXmlNodeAsNullableInt32(objectElementNode, "id");
            output.Name = GoGridHelper.GetAttributeElementValueFromXmlNodeAsString(objectElementNode, "name");
            output.Description = GoGridHelper.GetAttributeElementValueFromXmlNodeAsString(objectElementNode, "description");

            return output;
        }

        public int? ID { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }

        public override string ToString()
        {
            return this.Name;
        }
    }
}
